<template>
  <view class="py-2 d-flex align-items-center fs-5 text-light bg-danger">
    <image src="/static/img/左箭头.svg" @click="goBack" class="ms-4" style="width: 1.5rem;height: 1.5rem"/>
    <view class="flex-grow-1 text-center fs-5">{{ title }}</view>
    <CustomerService3 v-if="title2" :title="title2" class=""></CustomerService3>
    <view class="fs-6" style="min-width: 4rem" v-else>{{ title2 }}</view>
  </view>
</template>

<script>
import CustomerService3 from "./CustomerService3.vue";

export default {
  name: "HeaderComponent",
  components: {
    CustomerService3,
  },
  props: {
    title: {
      type: String,
      default: "title",
    },
    title2: {
      type: String,
      default: "",
    }
  },

  methods: {
    goBack() {
      uni.navigateBack();
    }
  }
}
</script>

<style>
</style>
